home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / COMM / PCCP038.ARJ / MANUAL < prev    next >
Text File  |  1992-07-05  |  7KB  |  187 lines

  1.  
  2.  
  3.           Pete Cann's Communication Package
  4.  
  5.         Portions Copyright (C) 1992 Peter Edward Cann
  6.  
  7.          (Please see the file README for legal junk)
  8.  
  9. This is a set of programs and data files for communication between a
  10. PC and something external, possibly over a modem. It is drastically
  11. different from most other communications programs, in that it is
  12. highly modular and generally requires the user to write batch files
  13. and/or scripts to make use of it. This is what you might call a
  14. "hacker style" paradigm (not to be confused with "cracker", generally
  15. an infantile individual who feels so insignificant that they screw
  16. other people in a desperate attempt to feel powerful). Hackers are
  17. people who are very comfortable with computers, and like to have a
  18. lot of control and to know what's going on. The source code for all
  19. of these programs is included in the distribution, so if you know C
  20. you have all the information I do now.
  21.  
  22. All of the programs give USAGE: information if invoked without
  23. arguments. All of the programs that use a port can use COM 1 through
  24. 8, but COM 5 and 6 are only for AT and later machines and have not
  25. been tested.
  26.  
  27. The centerpiece of the package is TERM. This is a terminal emulator.
  28. It takes an emulation file, which you create or modify with EMUED.
  29. EMUED lets you specify strings to send for any programmable key, and
  30. lets you enter strings of characters and substitution tokens to
  31. invoke functions. These would be the "escape sequences", although
  32. they need not begin with Escape. The token codes are in EMU.H. The
  33. emulation facility also provides a graphics character substitution
  34. table for graphics character commands. TERM and EMUED look in the
  35. directory named by the PCCPPATH environment variable for emulation
  36. files, if PCCPPATH is set. The program CCODES types a hex listing of
  37. display character codes for use when assigning graphics characters in
  38. EMUED.
  39.  
  40. TERM generates a CRLF in response to a Linefeed character, so it is
  41. often desirable to program an emulation to do a DOWN in response to a
  42. Linefeed. For LF insertion, the function CRLF can be performed in
  43. response to a CR. If the emulation file basename is prefixed with a
  44. plus sign (+), local echo is activated.
  45.  
  46. The program MASTERM invokes term with the three or four arguments,
  47. but if you exit TERM you get a menu for file transfers or beginning a
  48. dribble file. The file transfer programs are three variations on
  49. XMODEM in each direction, and have fairly clear names.
  50.  
  51. The program SESSION is a simple host program, for use AFTER password
  52. validation by the script facility. It is hard-coded for 8n1 bits. It
  53. expects the modem to be in AT&C1 mode, that is, Carrier Detect
  54. conveys information. The last (optional) argument to SESSION is a
  55. directory. If it is given, it is prepended to the entered pathname in
  56. file transfer operations. If a directory is given, dot-dot (..) is
  57. prohibited in pathnames and the Shell option is not available.
  58.  
  59. The environment of any subschell contains REMOTE=YES, so you can do
  60.  
  61.     IF NOT "%REMOTE%"=="YES" THING
  62.  
  63. in a batch file, where THING is something that would be bad to do
  64. from a comport, such as run a display editor. SESSION terminates if
  65. Carrier Detect goes false.
  66.  
  67. The program MESSIN accepts a message from the port and appends it to
  68. the specified file. This is for email to the sysop. The program
  69. MESSOUT asks for a filename in the specified directory and displays
  70. it with pagination. Security is achieved through sparse naming.
  71.  
  72. The program COMSCRPT runs scripts. It is very powerful, with multiple
  73. branching look-fors, timeouts and retry limits.
  74.  
  75. The script file must have the extension ".SCR". If the PCCPPATH
  76. environment variable is set, the program looks for the script there.
  77. The program loads the script into RAM and then executes it. Lines are
  78. limited to 80 characters. The number of lines is limited to 512.
  79.  
  80. The characters '|' and '~' are special. '|' means CR in < lines and >
  81. lines (LF is stripped for > processing); and newline in ! lines. '~'
  82. means 0.4 second delay in < lines and bell in ! lines. (In > lines it
  83. means itself.) Also, in < and > lines, `xx (backquote followed by two
  84. hex digits) expands to the specified character code. Letters in the
  85. hex number may be either case. There is no validity checking. Also in
  86. < lines, ^ means break. To send a magic character, use its hex code
  87. with a backquote.
  88.  
  89. The first line of the script file is the first three arguments as for
  90. TERM, space-delimited. In subsequent lines, the first character of
  91. each line is the command; the rest of the line (after the delimiting
  92. space) is argument(s). A final string argument may include spaces,
  93. and begins after the delimiting space. Blank lines are ignored.
  94.  
  95. The command characters are as follows:
  96.  
  97. ;
  98.     {introduces comment; line ignored; space not required}
  99.  
  100. : <decimal number 0-255>
  101.     {label for conditional or unconditional goto} 
  102.  
  103. g <label #>
  104.     {goto label #}
  105.  
  106. * <label #>
  107.     {establishes a demon to goto label upon Control-X from keyboard}
  108.     {* -1 cancels}
  109.  
  110. r <label #> <retries> <handle>
  111.     {resets retry count and goes to label if hit more than retries}
  112.     {handle is 0 - 255 and supersedes previous use of same handle}
  113.  
  114. 0 <retry handle>
  115.     {resets a retry counter having the specified handle}
  116.  
  117. p <seconds>
  118.     {processes pending look-fors; falls through upon timeout}
  119.     {clears pending look-for list upon completion}
  120.     {zero seconds indicates no timeout}
  121.  
  122. > <label #> <string>
  123.     {look for string upon p command; if hit goto label}
  124.     {incoming linefeeds ignored}
  125.  
  126. ? <label #>
  127.     {goto label if Clear To Send or Tx Hold Reg Empty is false}
  128.  
  129. d <label #>
  130.     {goto label if Carrier Detect is true}
  131.  
  132. < <string>
  133.     {send string to port}
  134.  
  135. ! <string>
  136.     {send string to console}
  137.  
  138. x <label #> <command line string>
  139.     {run executable file with arguments and wait for termination}
  140.     {goto label # if non-zero exit code}
  141.  
  142. s <label #> <command line string>
  143.     {run system command line and wait for termination}
  144.     {goto label # if error in running command.com}
  145.     {will not report errors within command string}
  146.  
  147. +
  148.     {Raise DTR handshake line}
  149.  
  150. -
  151.     {Drop DTR handshake line}
  152.  
  153. k <label> <character>
  154.     {set branch to label upon keyboard character received in w function}
  155.     {limit 64 simultaneous characters pending}
  156.  
  157. w <seconds>
  158.     {wait seconds for keyboard character, performing k dispatching}
  159.     {fall through if no character in <seconds> seconds}
  160.     {zero seconds indicates no timeout}
  161.     {clears all k commands pending upon any termination}
  162.  
  163. c
  164.     {clears pending lookfors and keys (> and k)}
  165.  
  166. q <exit code>
  167.     {quit with exit code}
  168.     {codes other than zero under 128 are reserved to internals}
  169.  
  170. When scripting modem commands, which is how you're intended to
  171. configure and dial the modem, try a ~ before and after the at, for
  172. instance:
  173.  
  174.     < ~at~&f&c1&d2|
  175.  
  176. The program SCRCHK types a listing of the argument script file giving
  177. statement numbers, which are not the same as line numbers. It leaves
  178. out blank lines for some reason. It also detects some errors.
  179.  
  180. During execution of a script, Control-C will cancel and Control-X can
  181. redirect the script.
  182.  
  183. All of the I/O programs except TERM pay attention to CTS. None of
  184. them do XON/XOFF. The computer is assumed to be fast enough to keep
  185. up. However, since DOS video is very slow, TERM will suspend display
  186. if a buffer overrun threatens.
  187.